package com.lap.framework.generator.infra.query;

import com.lap.framework.generator.configure.model.Jdbc;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class DataSourceFactory {

  private DataSourceFactory() {}

  public static Connection createConnection(Jdbc jdbc) throws SQLException {
    return DriverManager.getConnection(
        jdbc.getUrl(), jdbc.getUsername(), jdbc.getPassword());
  }
}
